<?php
/**
 * Created by PhpStorm.
 * User: pc
 * Date: 2024/1/26
 * Time: 16:23
 */

namespace app\common\service;

use app\common\enum\OptionMapItemEnum;

class OptionMapItem
{
    protected $class;
    protected $id = OptionMapItemEnum::ID;
    protected $name = OptionMapItemEnum::NAME;
    protected $extend;
    protected $where;
    protected $pid = OptionMapItemEnum::PID;
    protected $type = OptionMapItemEnum::TYPE_LIST;
    protected $options;
    protected $is_leaf = false;
    protected $ext_server;

    /**
     * @return mixed
     */
    public function getExtServer()
    {
        return $this->ext_server;
    }

    /**
     * @param $ext_server
     * @return $this
     */
    public function setExtServer($ext_server)
    {
        $this->ext_server = $ext_server;
        return $this;
    }

    /**
     * @return bool
     */
    public function isLeaf()
    {
        return $this->is_leaf;
    }

    /**
     * @param $is_leaf
     * @return $this
     */
    public function setIsLeaf($is_leaf)
    {
        $this->is_leaf = $is_leaf;
        return $this;
    }

    /**
     * @return mixed
     */
    public function getOptions()
    {
        return $this->options;
    }

    /**
     * @param $options
     * @return $this
     */
    public function setOptions($options)
    {
        $this->options = $options;
        return $this;
    }

    /**
     * @return string
     */
    public function getPid()
    {
        return $this->pid;
    }

    /**
     * @param $pid
     * @return $this
     */
    public function setPid($pid)
    {
        $this->pid = $pid;
        return $this;
    }

    /**
     * @return string
     */
    public function getType()
    {
        return $this->type;
    }

    /**
     * @param $type
     * @return $this
     */
    public function setType($type)
    {
        $this->type = $type;
        return $this;
    }

    /**
     * @return mixed
     */
    public function getClass()
    {
        return $this->class;
    }

    /**
     * @param $class
     * @return $this
     */
    public function setClass($class)
    {
        $this->class = $class;
        return $this;
    }

    /**
     * @return mixed
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * @param $id
     * @return $this
     */
    public function setId($id)
    {
        $this->id = $id;
        return $this;
    }

    /**
     * @return mixed
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * @param $name
     * @return $this
     */
    public function setName($name)
    {
        $this->name = $name;
        return $this;
    }

    /**
     * @return mixed
     */
    public function getExtend()
    {
        return $this->extend;
    }

    /**
     * @param $extend
     * @return $this
     */
    public function setExtend($extend)
    {
        $this->extend = $extend;
        return $this;
    }

    /**
     * @return mixed
     */
    public function getWhere()
    {
        return $this->where;
    }

    /**
     * @param $where
     * @return $this
     */
    public function setWhere($where)
    {
        $this->where = $where;
        return $this;
    }

    public static function createInstance(){
        return new self();
    }
}